<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<%@ page import="com.scalar.chiptrack.utils.ConfigManager,
                 com.scalar.chiptrack.commons.Constants" %>
<%@ page import="com.scalar.chiptrack.users.User" %>
<%@ page import="com.scalar.chiptrack.commons.SessionKeys" %>
<%@ page import="com.scalar.chiptrack.users.Functionality" %>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>

<chiptrack:checkLogon sourcePage="/boardInvDataEntry.do"/>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();  %>
<% User user1 = (User) session.getAttribute(SessionKeys.USER_KEY); %>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<script language="javascript">

function selectProcessType()
{
   var form = document.boardInvDataEntryform;

   if( form.processType.value == '0' )
   {
        form.action.value = 'processTypes';
        form.submit();
        return;
   }
   if( form.processStepId != null )
   {
	    form.processStepId.value='0';
   }

   form.action.value="partNumbers";
   form.submit();
}
function selectPartNumber()
{
   var form = document.boardInvDataEntryform;

   if( form.processStepId.value == '0' || form.processStepId.value == '-1' || form.processStepId.value == '-2' )
   {
        form.action.value = 'partNumbers';
        form.submit();
        return;
   }
   if( form.locationId != null )
   {
	    form.locationId.value='0';
   }

   form.action.value="locations";
   form.submit();
}
function loadVendorLocations()
{
   var form = document.boardInvDataEntryform;

   if( form.locationId.value == '0' )
   {
        form.action.value   = 'locations';
        form.submit();
        return;
   }
   if( form.fabLotNo != null )
   {
	    form.fabLotNo.value='0';
   }
   form.action.value="fabLotNumbers";
   form.submit();
}

function loadFabLotnumbers()
{
    var form = document.boardInvDataEntryform;

    if( form.fabLotNo.value == '0' )
    {
        form.action.value   = "fabLotNumbers";
	    form.submit();
    	return ;
    }
   if( form.fabLotNo.value == '-1' )
   {
       form.action.value="loadLotInfo";
       form.submit();
       return ;
   }
   if( form.lotId != null )
   {
	    form.lotId.value='0';
   }
    form.action.value   = "lotNumbers";
	form.submit();
}

function loadLotnumbers()
{
    var form = document.boardInvDataEntryform;

    if( form.lotId.value == '0' )
    {
        form.action.value   = "lotNumbers";
	    form.submit();
    	return ;
    }
    form.action.value   = "loadLotInfo";
	form.submit();
}

function loadLotInfo()
{
    var form = document.boardInvDataEntryform;

    form.action.value="loadLotInfo";
    form.submit();
}
function loadShopOrders()
{
    var form = document.boardInvDataEntryform;

    if( form.processType.value == "FAB" || form.processType.value == "CP" || form.processType.value == "BUMPING")
    {
        form['invLotDetails.waferIds'].disabled = false;
    }

    form.action.value="shopOrderNo";
    form.submit();
}


var dateElement = "";
function openCalendar(dateValue)
{
    dateElement = dateValue;
	newWindow = window.open('<%=chipTracContext%>/jsp/includes/calendar.html','optionsPopup','channelmode=no,directories=no,toolbar=no,menubar=no,personalbar=no,status=no,scrollbars=no,width=180,height=440,resizable=no');
	newWindow.moveTo(550,180);
	newWindow.focus();
}

function assignDate(passedValue)
{
	dateElement.value=passedValue;
	window.focus();
}


function finalSave()
{
    var form = document.boardInvDataEntryform;
	var pa=document.getElementById("message");
	pa.innerHTML = '';

    if(productSelected(form)==false)
    {
        return;
    }
    if(locationSelected(form)==false)
    {
        return;
    }
    /*if(lotNoSelected(form)==false)
    {
        return;
    }*/
    if (form.fabLotNo.value == "-1")
    {
        if (form['invLotDetails.fabLotNumber'].value == '')
        {
            pa.innerHTML = "<li>Enter Fab Lot Number</li>";
            form['invLotDetails.fabLotNumber'].focus();
            return;
        }
        if (form['invLotDetails.fabLotNumber'].value.indexOf("'") != "-1")
        {
            pa.innerHTML = "<li>Single quotation is not acceptable in Fab Lot Number</li>";
            form['invLotDetails.fabLotNumber'].focus();
            return;
        }
        if (form['invLotDetails.vendorLotNumber'].value == '')
        {
            pa.innerHTML = "<li>Enter Vendor Lot Number</li>";
            form['invLotDetails.vendorLotNumber'].focus();
            return;
        }
        if (form['invLotDetails.vendorLotNumber'].value.indexOf("'") != "-1")
        {
            pa.innerHTML = "<li>Single quotation is not acceptable in Vendor Lot Number</li>";
            form['invLotDetails.vendorLotNumber'].focus();
            return;
        }
    }
    if(form.fabLotNo.value != "-1")
    {
        if(form.lotId.value =="-1")
        {
             if(form['invLotDetails.vendorLotNumber'].value=='')
            {
                pa.innerHTML = "<li>Enter Vendor Lot Number</li>";
                form['invLotDetails.vendorLotNumber'].focus();
                return;
            }
            if( form['invLotDetails.vendorLotNumber'].value.indexOf("'") != "-1" )
            {
                pa.innerHTML = "<li>Single quotation is not acceptable in Vendor Lot Number</li>";
                form['invLotDetails.vendorLotNumber'].focus();
                return;
            }
        }
    }
    /*if( form.processType.value == "DIE BANK" || form.processType.value == "Finished Goods" )
    {*/
        if (form['invLotDetails.dieQtyIn'].value == '')
        {
            form['invLotDetails.dieQtyIn'].focus();
            pa.innerHTML = "<li>Enter Quantity In</li>";
            return;
        }
        if (parseInt(form['invLotDetails.dieQtyIn'].value) == 0)
        {
            pa.innerHTML = "<li>Zero value is not permitted for Quantity In, Please enter greater than Zero";
            form['invLotDetails.dieQtyIn'].focus();
            return;
        }

    /*}*/
    if(form['invLotDetails.dateOut'].value!='')
    {
        /*if (form.processType.value == "DIE BANK" || form.processType.value == "Finished Goods")
        {*/

            if ( parseInt (form['invLotDetails.dieQtyIn'].value) == 0 )
            {
                pa.innerHTML = "<li>Zero value is not permitted for Quantity In";
                form['invLotDetails.dieQtyIn'].focus();
                return;
            }
            if ( chkDate ( form['invLotDetails.dateOut'].value , 'DateOut ' , 'Y' ) == false )
            {
                  pa.innerHTML = errMsg;
                  form['invLotDetails.dateOut'].focus();
                  return;
            }
            if(form['invLotDetails.dieQtyOut'].value=='')
            {
                pa.innerHTML = "Enter Quantity Out";
                return;
            }
        /*}*/
    }
    /*if (form.processType.value == "DIE BANK" || form.processType.value == "Finished Goods" )
    {*/
        if (form['invLotDetails.dieQtyOut'].value != '')
        {
            if (!isInteger(form['invLotDetails.dieQtyOut'].value))
            {
                pa.innerHTML = "Enter valid Quantity Out, Quantity Out must be number";
                return;
            }
            if (parseInt(form['invLotDetails.dieQtyOut'].value) == 0)
            {
                pa.innerHTML = "<li>Zero value is not permitted for Quantity Out, Enter greater than Zero";
                form['invLotDetails.dieQtyOut'].focus();
                return;
            }
            if (parseInt(form['invLotDetails.dieQtyOut'].value) > parseInt(form['invLotDetails.dieQtyIn'].value))
            {
                pa.innerHTML = "Quantity Out can not be greater than Quantity In";
                form['invLotDetails.dieQtyOut'].focus();
                return;
            }
        }
    /*}*/
    if (form['invLotDetails.dateIn'].value == '')
    {
        pa.innerHTML = "Enter Date In";
        form['invLotDetails.dateIn'].focus();
        return;
    }
    if( form['invLotDetails.dateOut'].value != '')
    {
        if (!validateDateOut(formatDateAsMMDDYYYY(form['invLotDetails.dateIn'].value), formatDateAsMMDDYYYY(form['invLotDetails.dateOut'].value)))
        {
            pa.innerHTML = "Date Out cannot be less than Date In";
            form['invLotDetails.dateOut'].focus();
            return;
        }
    }
    if( form['invLotDetails.lotCategory'].value == '' )
	{
		pa.innerHTML = "<li>Select Lot Category";
        form['invLotDetails.lotCategory'].focus();
        return;
	}
    if( form['invLotDetails.lotStatus'].value == '' )
	{
		pa.innerHTML = "<li>Select Lot Status";
        form['invLotDetails.lotStatus'].focus();
        return;
	}

   /* if( form.processType.value == "DIE BANK" || form.processType.value == "Finished Goods" )
    {*/
        if (form['invLotDetails.dieQtyOut'].value != '' && form['invLotDetails.dateOut'].value == '')
        {
            pa.innerHTML = "Enter Date Out";
            form['invLotDetails.dateOut'].focus();
            return;
        }
    /*}*/
    if( form['invLotDetails.comments'].value.trim().length > 1000 )
	{
		pa.innerHTML = "<li>Comments should not be greater than 1000 characters";
        form['invLotDetails.comments'].focus();
        return;
	}
    form.action.value="save";
    form.submit();
}

function productSelected(form)
{
    var pa=document.getElementById("message");
    var x = form.processStepId;

    for(var i=0; i< x.length; i++)
    {
        if(x.options[i].selected)
        {
	        if(x.options[i].value == "0")
            {
	            pa.innerHTML = "<li>Select Product Name</li>";
                x.focus();
	            return false;
            }
        }
    }
    return true;
}

function lotNoSelected(form)
{

    var pa=document.getElementById("message");
    var x = form.lotId;

    for(var i=0; i< x.length; i++)
    {
        if(x.options[i].selected)
        {
	        if(x.options[i].value == "0")
            {
	            pa.innerHTML = "<li>Select Lot Number</li>";
                x.focus();
	            return false;
            }
        }
    }
    return true;
}

function isValidInteger(temp)
{
    errors = "";
    var pa=document.getElementById("message");

    if(!isInteger(temp.value))
    {
        errors = "<li>Please enter a valid integer</li>";
        pa.innerHTML = errors;
        temp.focus();
        return false;
    }

    return true;
}

function locationSelected(form)
{
    var pa=document.getElementById("message");
    var x = form.locationId;

    for(var i=0; i< x.length; i++)
    {
        if(x.options[i].selected)
        {
	        if(x.options[i].value == "0")
            {
	            pa.innerHTML = "<li>Select Location</li>";
                x.focus();
	            return false;
            }
        }
    }
    return true;
}


function checkLength(element, size)
{
    if(	element.value.length >= size )
	{
		event.returnValue = false;
	}
}

</script>
<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
        <!-- Side Navigation start -->
        <% if( user1.isBoardKitManagementAccess() ) { %>
        <%@ include file="/jsp/marketing/board_management_menu.jsp" %>
        <% } else { %>
        <%@ include file="/jsp/operations/dataentryMenu.jsp" %>
        <% } %>
<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">
<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>
<html:form name="boardInvDataEntryform" type="com.scalar.chiptrack.operations.dataentry.boardInventory.forms.boardInventoryDataEntryForm" action="/boardInvDataEntry" >
<input type="hidden" name="action" value="<%= (String)request.getAttribute("action")%>">
<TABLE border="0" width="90%" align=center>
<TR><TD colspan=5 class="NArialW" align="center">Board Inventory Data Entry</TD></TR>
<TR><TD colspan=5>&nbsp;</TD></TR>
<TR><TD colspan=5 class='NArialL'><strong><FONT id="message" styleClass="NArialL" color='FF0000'></FONT></strong></TD></TR>
<TR><TD colspan=5>
  <chiptrack:info styleClass="NArialL" />
  <chiptrack:errors styleClass="NArialL" />
  <chiptrack:messages type="info" styleClass="NArialL" />
</TD></TR>
<logic:equal name="showMessage" value="TRUE">
    <tr><td colspan=5 align='left'><font class='NArialS'color='blue'><b><%=Constants.NO_MODIFY_RIGHTS %></b></font></TD></TR>
</logic:equal>
<TR><TD COLSPAN=5>&nbsp;</TD></TR>
<TR><TD>
<TABLE  border="0" width="100%" cellpadding="1" cellspacing="5">
    <TR>
        <logic:present name="processTypeList" scope="request">
            <TD width="20%" class="NArialL">Process Type:</TD>
            <TD width="30%" class="NArialL">
            <html:select property="processType" name="boardInvDataEntryform" styleClass="txfield" onchange="selectProcessType()" >
            <html:option value="0">Select Process Type</html:option>
            <html:options collection="processTypeList" property="value" labelProperty="label"/>
            </html:select>
            </TD>
        </logic:present>
        <logic:notPresent name="processTypeList" scope="request">
            <TD width="20%" class="NArialL">&nbsp;</TD>
            <TD width="30%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>
        <logic:present name="partNumbersList" >
            <TD width="25%"><font class="NArialL">Product Name:</font></TD>
            <TD width="25%" class="NArialL">
                <html:select property="processStepId"  name="boardInvDataEntryform" styleClass="txfield" onchange="selectPartNumber()">
                <html:option value="0">Select Part Number</html:option>
                <html:options collection="partNumbersList" property="value" labelProperty="label"/>
                </html:select>
            </TD>
        </logic:present>
        <logic:notPresent name="partNumbersList" scope="request">
            <TD width="25%" class="NArialL">&nbsp;</TD>
            <TD width="25%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>
    </TR>
    <TR>
        <logic:present name="locationList" scope="request">
            <TD width="20%"><font class="NArialL">Location:</font></TD>
            <TD width="30%" class="NArialL">
                <html:select property="locationId" name="boardInvDataEntryform" styleClass="txfield" onchange="loadVendorLocations()">
                    <html:option value="0">Select Location</html:option>
                    <html:options collection="locationList" property="value" labelProperty="label"/>
                </html:select>
            </TD>
        </logic:present>
        <logic:notPresent name="locationList" scope="request">
            <TD width="20%" class="NArialL">&nbsp;</TD>
            <TD width="30%" class="NArialL">&nbsp;</TD>
        </logic:notPresent>
        <logic:present name="invFabLotNoList" scope="request">
            <TD width="25%"><font class="NArialL">Fab Lot Number:</font></TD>
            <TD width="25%" class="NArialL">
                <html:select property="fabLotNo"  name="boardInvDataEntryform" styleClass="txfield" onchange="loadFabLotnumbers()" >
                    <html:option value="0">Select Fab Lot  Number</html:option>
                    <html:option value="-1">--New Fab Lot Number--</html:option>
                    <html:options collection="invFabLotNoList" property="value" labelProperty="label"/>
                </html:select>
            </TD>
        </logic:present>
        <logic:notPresent name="invFabLotNoList" scope="request">
            <TD width="25%" class="NArialL">&nbsp;</TD>
            <TD width="25%" class="NArialL">&nbsp;</TD>
       </logic:notPresent>
    </TR>
    <TR>
        <logic:notEqual name="boardInvDataEntryform" property="fabLotNo" value="-1">
            <logic:present name="invList" scope="request">
                <TD width="20%"><font class="NArialL">Lot Number:</font></TD>
                <TD width="30%" class="NArialL">
                    <html:select property="lotId"  name="boardInvDataEntryform" styleClass="txfield" onchange="loadLotnumbers()" >
                        <html:option value="0">Select Lot  Number</html:option>
                        <html:option value="-1">--New Lot Number--</html:option>
                        <html:options collection="invList" property="value" labelProperty="label"/>
                    </html:select>
                </TD>
            </logic:present>
        </logic:notEqual>
        <logic:notPresent name="invFabLotNoList" scope="request">
            <TD width="20%" class="NArialL">&nbsp;</TD>
            <TD width="30%" class="NArialL">&nbsp;</TD>
       </logic:notPresent>
    </TR>
    <TR>
        <TD colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></TD>
    </TR>
    <logic:notEqual name="boardInvDataEntryform" property="fabLotNo" value="0">
        <nested:nest property="invLotDetails">
            <logic:equal name="boardInvDataEntryform" property="fabLotNo" value="-1">
                <TR>
                    <TD width="20%"><font class="NArialL">Fab Lot Number:<font color="red"><b>*</b></font></font></TD>
                    <TD width="30%" class="NArialL"><nested:text property="fabLotNumber" styleClass="txfield" size="25" maxlength="50"/></TD>
                    <TD width="25%"><font class="NArialL">Vendor Lot Number:<font color="red"><b>*</b></font></font></TD>
                    <TD width="25%" class="NArialL"><nested:text property="vendorLotNumber" styleClass="txfield"  size="25" maxlength="50" /></TD>
                </TR>
            </logic:equal>
            <logic:equal name="boardInvDataEntryform" property="lotId" value="-1">
                <TR>
                    <TD width="25%">&nbsp;&nbsp;</TD>
                    <TD width="25%">&nbsp;&nbsp;</TD>
                    <TD width="25%"><font class="NArialL">Vendor Lot Number:<font color="red"><b>*</b></font></font></TD>
                    <TD width="25%" class="NArialL"><nested:text property="vendorLotNumber" styleClass="txfield"  size="25" maxlength="50" /></TD>
                </TR>
            </logic:equal>
            <logic:equal name="boardInvDataEntryform" property="fabLotNo" value="-1">

                    <TR>
                        <TD width="20%"><font class="NArialL">Quantity In:<font color="red"><b>*</b></font></font></TD>
                        <TD width="30%" class="NArialL"><nested:text property="dieQtyIn" size="16" styleClass="valuetxfield" maxlength="7" onkeypress="allowInteger()"/></TD>
                        <TD width="25%"><font class="NArialL">Quantity Out:</font></TD>
                        <TD width="25" class="NArialL"><nested:text property="dieQtyOut" size="16" styleClass="valuetxfield" maxlength="7" onkeypress="allowInteger()"/></TD>
                    </TR>

                <TR>
                    <TD width="20%"><font class="NArialL">Lot Category:<font color="red"><b>*</b></font></font></TD>
                    <TD width="30%" class="NArialL"><nested:select property="lotCategory" styleClass="txfield" >
                                            <html:option value="">Select Lot Category</html:option>
                                            <html:options collection="lotCategoryList" property="value" labelProperty="label"/>
                                            </nested:select></TD>
                    <TD width="25%"><font class="NArialL">Lot Status:<font color="red"><b>*</b></font></font></TD>
                    <TD width="25%" class="NArialL"><nested:select property="lotStatus" styleClass="txfield" >
                                            <html:option value="">Select Lot Status</html:option>
                                            <html:options collection="lotStatusList" property="value" labelProperty="label"/>
                                            </nested:select></TD>
                </TR>
                <TR>
                    <TD width="20%"><font class="NArialL">Date In:<font color="red"><b>*</b></font></font></TD>
                    <TD width="30%" class="NArialL"><nested:text property="dateIn" styleClass="txfield" size="16" maxlength="10" />
                    <a href="javascript:openCalendar(document.boardInvDataEntryform['invLotDetails.dateIn'])">
                    <img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
                    src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a></TD>
                    <TD width="25%"><font class="NArialL">Date Out:</font></TD>
                    <TD width="25%" class="NArialL"><nested:text property="dateOut" styleClass="txfield" size="16" maxlength="10" />
                    <a href="javascript:openCalendar(document.boardInvDataEntryform['invLotDetails.dateOut'])">
                    <img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
                    src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a></TD>
                </TR>

                <TR>
                    <TD width="20%"><font class="NArialL">Date Code:</font></TD>
                    <TD width="30%" class="NArialL"><nested:text property="dateCode" styleClass="txfield" size="16" maxlength="10" /></TD>
                    <logic:equal value='Finished Goods' name="boardInvDataEntryform" property="processType">
                        <TD width="25%"><font class="NArialL">Assembly Vendor</font></TD>
                        <TD width="25%" class="NArialL"> <nested:select  property="assemblyVendor" styleClass="txfield" >
                                            <html:option value="-1">Select Assembly Vendor</html:option>
                                            <html:options collection="assemblyVendorsList" property="value" labelProperty="label"/>
                                            </nested:select>
                    </logic:equal>
                    <logic:notEqual value='Finished Goods' name="boardInvDataEntryform" property="processType">
                     <TD width="25%">&nbsp;&nbsp;</TD>
                    <TD width="25%">&nbsp;&nbsp;</TD>
                     </logic:notEqual>
                </TR>
                <TR>
                    <TD colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></TD>
                </TR>
                <TR>
                    <TD class="NArialL"><font class="NArialL">Comments:</font></TD>
                    <TD colspan="3">
                    <nested:textarea property="comments" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="4" cols="80" /></TD>
                </TR>
          </logic:equal>
          <logic:notEqual name="boardInvDataEntryform" property="lotId" value="0">

                    <TR>
                        <TD width="20%"><font class="NArialL">Quantity In:<font color="red"><b>*</b></font></font></TD>
                        <TD width="30%" class="NArialL"><nested:text property="dieQtyIn" size="16" styleClass="valuetxfield" maxlength="7" onkeypress="allowInteger()"/></TD>
                        <TD width="25%"><font class="NArialL">Quantity Out:</font></TD>
                        <TD width="25" class="NArialL"><nested:text property="dieQtyOut" size="16" styleClass="valuetxfield" maxlength="7" onkeypress="allowInteger()"/></TD>
                    </TR>

                <TR>
                    <TD width="20%"><font class="NArialL">Lot Category:<font color="red"><b>*</b></font></font></TD>
                    <TD width="30%" class="NArialL"><nested:select property="lotCategory" styleClass="txfield" >
                                            <html:option value="">Select Lot Category</html:option>
                                            <html:options collection="lotCategoryList" property="value" labelProperty="label"/>
                                            </nested:select></TD>
                    <TD width="25%"><font class="NArialL">Lot Status:<font color="red"><b>*</b></font></font></TD>
                    <TD width="25%" class="NArialL"><nested:select property="lotStatus" styleClass="txfield" >
                                            <html:option value="">Select Lot Status</html:option>
                                            <html:options collection="lotStatusList" property="value" labelProperty="label"/>
                                            </nested:select></TD>
                </TR>
                <TR>
                    <TD width="20%"><font class="NArialL">Date In:<font color="red"><b>*</b></font></font></TD>
                    <TD width="30%" class="NArialL"><nested:text property="dateIn" styleClass="txfield" size="16" maxlength="10" />
                    <a href="javascript:openCalendar(document.boardInvDataEntryform['invLotDetails.dateIn'])">
                    <img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
                    src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a></TD>
                    <TD width="25%"><font class="NArialL">Date Out:</font></TD>
                    <TD width="25%" class="NArialL"><nested:text property="dateOut" styleClass="txfield" size="16" maxlength="10" />
                    <a href="javascript:openCalendar(document.boardInvDataEntryform['invLotDetails.dateOut'])">
                    <img onMouseOver="window.status='Click here to select date';return true" onMouseOut="window.status='';return true" border="0" align='center'
                    src="<%=chipTracContext%>/jsp/includes/images/date_selector.gif" height=20 width=20></a></TD>
                </TR>

                <TR>
                    <TD width="20%"><font class="NArialL">Date Code:</font></TD>
                    <TD width="30%" class="NArialL"><nested:text property="dateCode" styleClass="txfield" size="16" maxlength="10" /></TD>
                    <logic:equal value='Finished Goods' name="boardInvDataEntryform" property="processType">
                        <TD width="25%"><font class="NArialL">Assembly Vendor</font></TD>
                        <TD width="25%" class="NArialL"> <nested:select  property="assemblyVendor" styleClass="txfield" >
                                            <html:option value="-1">Select Assembly Vendor</html:option>
                                            <html:options collection="assemblyVendorsList" property="value" labelProperty="label"/>
                                            </nested:select>
                    </logic:equal>
                    <logic:notEqual value='Finished Goods' name="boardInvDataEntryform" property="processType">
                     <TD width="25%">&nbsp;&nbsp;</TD>
                    <TD width="25%">&nbsp;&nbsp;</TD>
                     </logic:notEqual>
                </TR>
                <TR>
                    <TD colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=10></TD>
                </TR>
                <TR>
                    <TD class="NArialL"><font class="NArialL">Comments:</font></TD>
                    <TD colspan="3">
                    <nested:textarea property="comments" onkeypress="javascript:checkLength(this, 1000)" styleClass="txfield" rows="4" cols="80" /></TD>
                </TR>
            </logic:notEqual>
        </nested:nest>
        <TR>
            <TD colspan="4"><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20></TD>
        </TR>
        <logic:equal name="boardInvDataEntryform" property="fabLotNo" value="-1">
            <TR>
                <TD colspan="4" align=center>
                    <%--<a href="javascript:finalSave();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17" onmouseover="window.status='Click to Save Inventory Data';return true" onmouseout="window.status='';return true" title="Click here to Save Inventory Data"></a>--%>
                    <% if( user1.isBoardKitManagementAccess() ) { %>
                    <chiptrack:restrictedLink functionality='<%=Functionality.BOARD_INVENTORY_DATA_ENTRY%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:finalSave();' onmouseover="window.status='Click here to Save Inventory Data';return true" onmouseout="window.status='';return true">
                        <img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" title="Click here to Save Packing Slip">
                    </chiptrack:restrictedLink>
                    <% } else { %>
                    <chiptrack:restrictedLink functionality='<%=Functionality.DATA_ENTRY%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:finalSave();' onmouseover="window.status='Click here to Save Inventory Data';return true" onmouseout="window.status='';return true">
                        <img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" title="Click here to Save Packing Slip">
                    </chiptrack:restrictedLink>
                    <% } %>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="<%=chipTracContext%>/boardInvDataEntry.do"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17" onmouseover="window.status='Click to Cancel Changes';return true" onmouseout="window.status='';return true" title="Click here to Cancel Changes"></a>
                </TD>
            </TR>
        </logic:equal>
        <logic:notEqual name="boardInvDataEntryform" property="lotId" value="0">
            <TR>
                    <TD colspan="4" align=center>
                        <%--<a href="javascript:finalSave();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17" onmouseover="window.status='Click to Save Inventory Data';return true" onmouseout="window.status='';return true" title="Click here to Save Inventory Data"></a>--%>
                        <% if( user1.isBoardKitManagementAccess() ) { %>
                        <chiptrack:restrictedLink functionality='<%=Functionality.BOARD_INVENTORY_DATA_ENTRY%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:finalSave();' onmouseover="window.status='Click here to Save Inventory Data';return true" onmouseout="window.status='';return true">
                            <img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" title="Click here to Save Packing Slip">
                        </chiptrack:restrictedLink>
                        <% } else { %>
                        <chiptrack:restrictedLink functionality='<%=Functionality.DATA_ENTRY%>' action='<%=User.USER_ACTION_MODIFY%>' href='javascript:finalSave();' onmouseover="window.status='Click here to Save Inventory Data';return true" onmouseout="window.status='';return true">
                            <img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" title="Click here to Save Packing Slip">
                        </chiptrack:restrictedLink>
                        <% } %>

                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <a href="<%=chipTracContext%>/boardInvDataEntry.do"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/cancel.gif" width="53" height="17" onmouseover="window.status='Click to Cancel Changes';return true" onmouseout="window.status='';return true" title="Click here to Cancel Changes"></a>
                    </TD>
            </TR>
        </logic:notEqual>
    </logic:notEqual>
    </TABLE>
   </TD>
 </TR>
</TABLE>
</html:form>
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>
<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</BODY>
</HTML>

